home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / pc / SNNSV32.ZIP / SNNSv3.2 / xgui / sources / d3_dither.ph < prev    next >
Encoding:
Text File  |  1994-04-25  |  1.5 KB  |  66 lines

  1. /*****************************************************************************
  2.   FILE           : d3_dither.ph
  3.   SHORTNAME      : dither.ph
  4.   SNNS VERSION   : 3.2
  5.  
  6.   PURPOSE        : private header
  7.   NOTES          :
  8.  
  9.   AUTHOR         : Ralf Huebner
  10.   DATE           : 1.12.1991
  11.  
  12.   CHANGED BY     : Sven Doering
  13.   IDENTIFICATION : @(#)d3_dither.ph    1.6 3/2/94
  14.   SCCS VERSION   : 1.6
  15.   LAST CHANGE    : 3/2/94
  16.  
  17.              Copyright (c) 1990-1994  SNNS Group, IPVR, Univ. Stuttgart, FRG
  18.  
  19. ******************************************************************************/
  20. #ifndef _D3_DITHER_DEFINED_
  21. #define  _D3_DITHER _DEFINED_
  22.  
  23. /* begin global definition section */
  24.  
  25. int dither (int x, int y, float level);
  26.  
  27. /* end global definition section */
  28.  
  29. /* begin private definition section */
  30. #define DITHER8x8
  31.  
  32. #ifdef DITHER8x8
  33.  
  34. static int size = 8;
  35.  
  36. static int dither_matrix[] = {
  37.        0,  48,  12,  60,   3,  51,  15,  63,
  38.       32,  16,  44,  28,  35,  19,  47,  31,
  39.        8,  56,   4,  52,  11,  59,   7,  55,
  40.       40,  24,  36,  20,  43,  27,  39,  23,
  41.        2,  50,  14,  62,   1,  49,  13,  61,
  42.       34,  18,  46,  30,  33,  17,  45,  29,
  43.       10,  58,   6,  54,   9,  57,   5,  53,
  44.       42,  26,  38,  22,  41,  25,  37,  21
  45. };
  46.  
  47. #else
  48.  
  49. static int size = 4;
  50.  
  51. static int dither_matrix[] = {
  52.        0,  12,   3,  15,
  53.        8,   4,  11,   7,
  54.        2,  14,   1,  13,
  55.       10,   6,   9,   5
  56. };
  57.  
  58. #endif
  59.  
  60. /* end private definition section */
  61.  
  62. #endif
  63.  
  64. /* end of file */
  65. /* lines: 26 */
  66.